// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
// import Vue from 'vue/dist/vue.common.js'
import App from './App'
import router from './router'
import Global from './global/global'
import '@/mock'
import Store from '@/store'
// 引入vuex
// 引入iView
import iView from 'iview'
import 'iview/dist/styles/iview.css'
Vue.use(iView)
// 引入mockjs
Vue.config.productionTip = false
// 权限指令
Vue.directive('has', {
  bind: (el, binding) => {
    if (!Vue.prototype.$_has(binding.value)) {
      el.parentNode.removeChild(el)
    }
  }
})
// 引用全局的方法
Vue.use(Global)
/* eslint-disable no-new */
new Vue({
  el: '#app',
  Store,
  router,
  components: { App },
  template: '<App/>'
})
